package cn.psvmc.cxzapi.mapper.system;

import cn.psvmc.cxzapi.config.mybatisplus.mapper.MyBaseMapper;
import cn.psvmc.cxzapi.model.common.SearchEntity;
import cn.psvmc.cxzapi.model.system.TMenu;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 菜单表 Mapper 接口
 * @Author auto
 * @Date 2024-08-11
 */
public interface TMenuMapper extends MyBaseMapper<TMenu> {

    //列表
    List<Map<String, Object>> listAll(@Param("entity") SearchEntity entity);

    //父级菜单列表
    List<Map<String, Object>> listParent(@Param("entity") SearchEntity entity);

    //根据菜单id获取菜单及父菜单id
    List<Integer> listMenuIdByMenuIds(@Param("menuIds") String menuIds);

    //角色权限菜单
    List<Map<String, Object>> listByUserType(@Param("usertype") Integer usertype);
}
